1. Field of the Invention
The present invention relates to an image processing apparatus transmitting image data, a control method for the image processing apparatus, and a storage medium.
2. Description of the Related Art
Conventionally, image processing apparatuses can transmit image data by using transmission protocols (transmission methods) such as facsimile transmission, electronic mail transmission, and various types of file transmission (e.g., a server message block (SMB), a file transfer protocol (FTP), and a distributed authoring and versioning protocol for the world wide web (WebDAV)). Such an image processing apparatus can not only transmit image data to one destination, but also transmit common image data to a plurality of destinations each corresponding to the same transmission protocol (multi-address transmission). In addition, there is an image processing apparatus capable of transmitting common image data to a plurality of destinations each corresponding to a different transmission protocol (different-type multi-address transmission).
Moreover, conventionally, there is a method by which an image processing apparatus starts to transmit image data after reading a plurality of documents prepared by a user and temporarily storing the image data for all pages of the read documents in a memory (this method is hereinafter called storage-type transmission).
On the other hand, Japanese Patent Application Laid-Open No. 2012-142680 discusses a method for transmitting image data for one page, each time a document for one page is read (this method is hereinafter called sequence-type transmission). The sequence-type transmission is used in an apparatus such as a low-price image processing apparatus for consumer use provided only with a scarce hardware resource (particularly, a memory). In the sequence-type transmission, the transmitted image data is deleted from the memory so that image data of subsequent pages can be stored in the memory. This enables transmission of image data for a plurality of pages even if the memory has a limited space.
When the storage-type transmission is executed, the image data can be repeatedly transmitted as long as the image data is not deleted from the memory. Accordingly, even if the image data is transmitted to a plurality of destinations by using a transmission protocol that needs to establish an individual communication (session) for each destination, the individual communications can be established for the respective destinations, thereby transmitting the image data acquired by one reading processing to the respective destinations. However, in a case where the image data for all of pages cannot be stored due to insufficient space in the memory, the image data cannot be transmitted.
In the sequence-type transmission, on the other hand, even if a memory resource does not have a sufficient space, image data of a plurality of pages can be transmitted without causing the memory space to be full. However, in the sequence-type transmission, image data corresponding to the first page is deleted from the memory by the time image data corresponding to the last page is transmitted. Consequently, when the image data is transmitted to the plurality of destinations by using the transmission protocol which needs to establish an individual communication for each destination, reading processing needs to be performed a plurality of times which causes extra labor.